<div class="row-fluid listcontent">
    <div class="span12">
        <div class="portlet box grey">
            <div class="portlet-title">
                <div class="caption"><i class="icon-cogs"></i>普通消息列表</div>
                <div class="actions" id="orderaline">
                    <!--                    <div class="btn-group">-->
                    <!--                        <a href="/admin/message/systemAdd?page={$page}" class="btn blue" id="add"><i class="icon-pencil"></i>&nbsp;&nbsp;添加</a>-->
                    <!--                    </div>-->
                    <div class="btn-group">
                        <a class="btn blue" href="#" data-toggle="dropdown">
                            <i class="icon-cogs"></i>&nbsp;&nbsp;操作
                            <i class="icon-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu pull-right" id="del" data-page="{$page}">
                            <li><a id="info_delete"><i class="icon-trash"></i>删除消息</a></li>
                            <!--                            <li><a id="info_forbidden"><i class="icon-lock"></i>禁用用户</a></li>-->
                            <!--                            <li><a id="info_recovery"><i class="icon-unlock"></i>恢复用户</a></li>-->
                        </ul>
                    </div>
                    <div class="btn-group">
                        <!--                        <a class="btn blue Download" href="javascript:void(0)" data-toggle="dropdown">-->
                        <!--                            <i class="icon-cogs"></i>&nbsp;&nbsp;导出流浪狗信息-->
                        <!--                        </a>-->
                    </div>
                </div>
            </div>
            <div class="portlet-body">
                <div class="dataTables_wrapper form-inline">
                    <div class="row-fluid">
                        <div class="span12">
                            <form id="searchform" action="" method="post">
                                
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="关键字"/>
                                        <input type="text" name="search[]"
                                               aria-controls="sample_2" class="m-wrap"
                                               value="{$search[0]?$search[0]:''}" style="height:20px;width: 160px"
                                               placeholder="ID|标题|电话"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="开始时间"/>
                                        <input type="text" name="search[]"
                                               aria-controls="sample_2" class="m-wrap"
                                               value="{$search[1]?$search[1]:''}" style="height:20px"
                                               onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="结束时间:"/>
                                        <input type="text" name="search[]" placeholder=""
                                               aria-controls="sample_2" class="m-wrap"
                                               value="{$search[2]?$search[2]:''}" style="height:20px"
                                               onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="浏览量:"/>
                                        <input type="text" name="search[]" placeholder=""
                                               aria-controls="sample_2" class="m-wrap" value="{$search[3]?$search[3]:0}"
                                               style="height:20px;width: 30px"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        -
                                        <input type="text" name="search[]" placeholder=""
                                               aria-controls="sample_2" class="m-wrap"
                                               value="{$search[4]?$search[4]:''}" style="height:20px;width: 30px"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="省:  "/>
                                    <select name='search[]' id="province" style="width: 100px;margin-right: 10px">
                                        <option value="">全部</option>
                                        <?php foreach($province as $key => $vo) { ?>
                                            <option value="{$vo['district_id']}"
                                                <?php if(isset($search[5]) && ($search[5] == $vo['district_id'])) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo.district}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="市:  "/>
                                    <select name='search[]' id="city" style="width: 100px;margin-right: 10px">
                                        <option value="">全部</option>
                                        <?php foreach($city as $key => $vo) { ?>
                                            <option value="{$vo['district_id']}"
                                                <?php if(isset($search[6]) && ($search[6] == $vo['district_id'])) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo.district}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter"
                                     style="float: left;margin-left:10px">
                                    <label>
                                        <input type="button" class="btn blue search" value="查询"/>
                                    </label>
                                </div>
                            
                            </form>
                        </div>
                    </div>
                    <input type="hidden" name="page" value="{$page}">
                    <table id="basicinfo" class="table table-hover table-bordered">
                        <thead>
                        <th style="width:8px;"><input type="checkbox"/></th>
                        <th>序号</th>
                        <th>ID</th>
                        <th style="width: 80px">标题</th>
                        <th>发布时间</th>
                        <th>浏览量</th>
                        <th>发布者头像</th>
                        <th>姓名</th>
                        <th>用户电话</th>
                        <th>发布地点</th>
                        <th>定位省</th>
                        <th>定位市</th>
                        <th>所属分类</th>
                        <th>发布权限</th>
                        <th>举报下架</th>
                        <th style="width:80px;">操作</th>
                        </thead>
                        <tbody>
                        {if(count($lists)>0)}
                        {volist name='lists' id='val' k='key'}
                        <tr class="odd gradeX ">
                            <td><input type="checkbox" class="checkboxes" name="id" value="{$val.a_id}"/></td>
                            <td>{++$key+$pages}</td>
                            <td>{$val.a_id}</td>
                            <td>{$val.a_title}</td>
                            <td>{$val.a_createtime}</td>
                            <td>{$val.a_num}</td>
                            <td>
                                <img src="{$val.user_image}" alt="" style="width: 50px;height: 50px">
                            </td>
                            <td>{$val.user_username}</td>
                            <td>{$val.user_phone}</td>
                            <td>{$val.district?$val.district:'无'}</td>
                            <td>{$val.province}</td>
                            <td>{$val.city}</td>
                            <td>{$val.a_type?$a_type[$val.a_type]:''}</td>
                            <td>无</td>
                            <td>
                                {if($val.a_down==1)}
                                <span class="label label-info down" id="down" style="cursor: pointer"
                                      data-id='{$val.a_id}'>下架</span>
                                {else/}
                                <span class="label label-info undown" data-id='{$val.a_id}' style="cursor: pointer">已下架</span>
                                {/if}
                            </td>
                            <td>
                                <a class="btn mini blue reset details" data-id='{$val.a_id}'><span>查看详情</span></a>
                            </td>
                        </tr>
                        {/volist}
                        {else/}
                        <tr>
                            <td colspan="16"><span style="margin-left: 50px">暂无数据</span></td>
                        </tr>
                        {/if}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        {if(!empty($lists))}
        {$lists->render()}
        {/if}
    </div>
</div>
